The Legend of Loro Jonggrang (alternative spelling Roro Jonggrang or Lara Jonggrang) is a Javanese popular legend (folktales) from Central Java telling the story of love and betrayal, the knight and the cursed princess. It also explains the mythical origin of Ratu Boko palace, Sewu temple, and the Durga statue in Prambanan temple compound.
The legend tells the story about two ancient and neighbouring kingdoms in Java, Pengging and Boko.
Pengging was prosperous, and wisely ruled by its king Prabu Damar Moyo who had a son named Bandung Bondowoso. By contrast, Boko was ruled by a cruel man-eating giant named Prabu Boko, supported by another giant Patih Gupolo. Despite his unpleasant nature, Prabu Boko had a beautiful daughter named Loro Jonggrang.
The story relates that Prabu Boko desired to expand his kingdom, and so began training an army and raising taxes for an invasion of Pengging. His forces launch a surprise attack on Pengging, and the ensuring war causes devastation and famine on both sides. In order to defeat the invader, Prabu Damar Moyo sends his son Bandung Bondowoso to fight Prabu Boko. After a furious battle, Prabu Boko is killed by the prince's supernatural powers. His assistant, the giant Patih Gupolo, leads his armies away from the battlefield in defeat.
Returning to Boko Palace, Patih Gupolo tells princess Loro Jonggrang of the death of her father. The princess is heartbroken, but before she can recover from her grief the Pengging army besieges and captures the palace. Prince Bandung Bondowoso is mesmerized by the beauty of the mourning princess and propose marriage, but his offer is swiftly rejected. Bandung Bondowoso insists on the union, and finally Loro Jonggrang agrees on two impossible conditions: first the prince must build a well named Jalatunda, and second, he must construct a thousand temples in only one night.
The lovestruck prince agrees, and immediately starts work on the well. Using his supernatural powers once again, the prince swiftly finishes construction and proudly displays his work for the princess. As a trick, she urges him to enter the well and when he does so, Patih Gupolo piles stones into it and buries him alive. With great effort Bandung Bondowoso escapes, but his love for the princess is so strong that he forgives her the attempt on his life.
To fulfill the second condition, the prince enters into meditation and conjures up a multitude of demon spirits from the earth. With their help he builds the first 999 temples and starts work on the final one. To thwart his efforts the princess and her maids light a fire in the east and begin pounding rice, a traditional dawn activity. Fooled into thinking the sun is about to rise, the spirits flee back into the earth leaving the last temple unfinished.
The prince is furious when he learns of this deception, and places a curse on Loro Jonggrang which turns her into a stone statue. In this way she herself becomes a feature of the final temple, completing its construction and fulfilling the conditions for their marriage.
This legend is a local popular folklore that connects and explains the supernatural origin of Central Java's famous archaeological sites; such as of the Ratu Boko palace, the Durga statue in northern cella/chamber of the main Prambanan shrine, and the Sewu temple complex nearby. Although the temples itself dated from circa 9th century, the legend was composed in later times, probably during Mataram Sultanate era.
According to tradition, this thousandth temple is part of the Sewu temple compound (Sewu means "thousands" in Javanese), and the Princess is the image of Durga in the north cell of the Shiva temple at Prambanan, still known as Loro Jonggrang or Slender Virgin.
Another interpretation mentioned that this legend could be a collective but vague local memory about past historical events that happened in the area, which staged around the 9th century wrestle of power between Sailendra and Sanjaya dynasty for control on Central Java. King Boko is probably inspired by the King Samaratungga of Sailendra dynasty, Bandung Bondowoso is Rakai Pikatan, a prince of Sanjaya dynasty, and Loro Jongrang is Pramodhawardhani, wife of Rakai Pikatan and the daughter of Sailendran king. The actual historical event was probably the contest of power between Sailendran heir, Balaputradewa against his sister Pramodhawardhani with aid of her husband Rakai Pikatan which led to Pikatan as the victor, thus ending the Sailendran rule on Central Java.